package com.example.myapplication01.chapter06.database;

import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;

public class Migration1To3 extends Migration {
    public Migration1To3() {
        super(1, 3);
    }

    @Override
    public void migrate(SupportSQLiteDatabase database) {
        // 在这里执行数据库迁移的 SQL 语句
        // 例如，添加新表或修改现有表
        database.execSQL("ALTER TABLE BookInfo ADD COLUMN new_column_name TEXT");
    }
} 